package cn.ava.ymcc.feign;

import cn.ava.ymcc.doc.CourseDoc;
import cn.ava.ymcc.feign.fallback.SearchFeignClientFallbackFactory;
import cn.ava.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = SearchFeignClientFallbackFactory.class)
public interface SearchFeignClient {

    @PostMapping("/course/save")
    JSONResult saveCourse(@RequestBody CourseDoc doc);

    @DeleteMapping("/course/delete")
    JSONResult deleteCourse(@RequestBody CourseDoc doc);

}
